package cn.bj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.bj.beans.Yxhq_work_picture;
import cn.bj.dao.Yxhq_work_pictureMapper;

@Service
public class YxhqWorkPictureService {
	@Autowired
	Yxhq_work_pictureMapper yxhq_work_pictureMapper;

	// 查询所有
	public List<Yxhq_work_picture> getAllYxhqWorkPicture() {
		return yxhq_work_pictureMapper.selectByExample(null);
	}

	// 插入
	public int insertYxhqWp(Yxhq_work_picture yxhqWP) {
		return yxhq_work_pictureMapper.insert(yxhqWP);
	}

	public int deleteByYxhqWP(Integer id) {
		return yxhq_work_pictureMapper.deleteByPrimaryKey(id);
	}

	public Yxhq_work_picture selectById(Integer id) {
		return yxhq_work_pictureMapper.selectByPrimaryKey(id);
	}

	public int updateYxhqWp(Yxhq_work_picture ywp) {
		return yxhq_work_pictureMapper.updateByPrimaryKey(ywp);
	}
}
